<template>
	<view class="wrap">
		<view class="nav-box">
			<uni-nav-bar left-icon="back" @clickLeft="$tab.back()" color="#FFF" background-color="transparent"
				:border="false" :status-bar="true" :fixed="false"></uni-nav-bar>
		</view>

		<view class="content w-full px-20 shadow-20 ">
			<scroll-view scroll-y style="height: 100%;" :show-scrollbar="true">
				<view class="bg-FFF round-12 pb-32">
					<!-- 审核信息 -->
					<view class="bg-FFF px-20 relative round-12" v-if="verifyState == -1">
						<view class="title bg-FFF pt-32">
							<view class="text-40 font-700 text-center">
								填写资料
							</view>

							<view class="mt-28">
								<u-steps :current="current" activeColor="#FD212C">
									<u-steps-item title="公司信息"></u-steps-item>
									<u-steps-item title="开户信息"></u-steps-item>
									<u-steps-item title="门店信息"></u-steps-item>
								</u-steps>
							</view>
						</view>

						<view class="" style="height:160rpx">

						</view>

						<view class="mt-48 text-right ">
							<u--form labelPosition="left" :model="form" :rules="companyRules" ref="companyRules"
								v-if="current == 0">
								<u-form-item label="店铺名称" labelWidth="80" prop="name" borderBottom>
									<u--input v-model="form.name" placeholder="请输入店铺名称"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
								<u-form-item label="店铺类型" labelWidth="80" prop="type" borderBottom
									@click="storeTypeShow = true;hideKeyboard()">
									<u--input :value="storeTypeName" disabled disabledColor="#ffffff"
										placeholder="请店铺类型" border="none">
									</u--input>
									<u-icon slot="right" name="arrow-right"></u-icon>
								</u-form-item>
								<u-form-item label="经营模式" labelWidth="120" prop="businessModel" borderBottom>
									<u-radio-group v-model="form.businessModel" placement="row">
										<u-radio activeColor="#F21A23" :customStyle="{marginBottom: '8px'}" v-for="(item, index) in settlement"
											:key="index" :label="item.name" :name="item.id">
										</u-radio>
									</u-radio-group>
								</u-form-item>
								<!-- 		<u-form-item label="店铺地址" labelWidth="80" prop="lon" borderBottom @click="selectAdress();hideKeyboard()">
									<u--input :value="form.lon ? form.lon + ',' + form.lng : ''" placeholder="请选择店铺地址"
										placeholder-style="text-align:right;" border="none" disabled
										disabledColor="#FFF"></u--input>
									<u-icon slot="right" name="arrow-right"></u-icon>
								</u-form-item> -->
								<u-form-item label="店铺详细地址" labelWidth="100" prop="address" borderBottom>
									<u--input v-model="form.address" placeholder="请输入店铺详细地址"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>

								<u-form-item label="联系人" labelWidth="80" prop="linkerName" borderBottom>
									<u--input v-model="form.linkerName" placeholder="请输入联系人"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
								<u-form-item label="联系人手机号" labelWidth="100" prop="linkerMobile" borderBottom>
									<u--input type="number" v-model="form.linkerMobile" placeholder="请输入联系人手机号"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
								<u-form-item label="营业执照上传" labelWidth="100" prop="businessLicense" borderBottom>
									<u-upload :fileList="liceniceList" @afterRead="productAfterRead"
										@delete="productDeletePic" name="营业执照上传" :maxCount="1"></u-upload>
								</u-form-item>
								<u-form-item label="内景照" labelWidth="60" prop="inDoorOne" borderBottom>
									<u-upload :fileList="inDoorOneList" @afterRead="productAfterRead"
										@delete="productDeletePic" name="内景照" :maxCount="5"></u-upload>
								</u-form-item>
							</u--form>

							<u--form labelPosition="left" :model="form" :rules="openRules" ref="openRules"
								v-if="current == 1">
								<u-form-item label="开户行名称" labelWidth="80" prop="openName" borderBottom>
									<u--input v-model="form.openName" placeholder="请输入开户行名称"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
								<u-form-item label="开户银行" labelWidth="80" prop="openBank" borderBottom>
									<u--input v-model="form.openBank" placeholder="请输入开户银行"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
								<u-form-item label="开户行账号" labelWidth="80" prop="openBankCard" borderBottom>
									<u--input v-model="form.openBankCard" placeholder="请输入开户行账号"
										placeholder-style="text-align:right;" border="none"></u--input>
								</u-form-item>
							</u--form>

							<u--form labelPosition="left" :model="form" :rules="storeRules" ref="storeRules"
								v-if="current == 2">
								<!-- <u-form-item label="入驻类型" labelWidth="120" prop="trade" borderBottom>
									<u-radio-group v-model="form.trade" placement="row">
										<u-radio activeColor="#F21A23" :customStyle="{marginBottom: '8px'}" v-for="(item, index) in account"
											:key="index" :label="item.name" :name="item.id">
										</u-radio>
									</u-radio-group>
								</u-form-item> -->
								<u-form-item label="店铺介绍" labelWidth="80" prop="detail" borderBottom>
									<u--textarea placeholder="不低于3个字" v-model="form.detail" confirmType="done" count>
									</u--textarea>
								</u-form-item>
								<u-form-item label="店铺logo" labelWidth="110" prop="logo" borderBottom>
									<u-upload :fileList="logoList" @afterRead="productAfterRead"
										@delete="productDeletePic" name="店铺logo" :maxCount="1"></u-upload>
								</u-form-item>
								<u-form-item label="门头照" labelWidth="110" prop="doorHead" borderBottom>
									<u-upload :fileList="doorHeadList" @afterRead="productAfterRead"
										@delete="productDeletePic" name="门头照" :maxCount="1"></u-upload>
								</u-form-item>
							</u--form>
						</view>
						<view class="mt-48 bottom w-full flex px-48 justify-around items-center">
							<view class="btn round-8 text-center text-FFF text-24 box-1 shadow-20" v-if="current > 0"
								@click="current -= 1">
								上一步
							</view>
							<view class="btn round-8 text-center text-FFF text-24 shadow-20 ml-28" @click="nextStep">
								{{ current == 2 ? '提交审核' : '下一步' }}
							</view>
						</view>
						<view class="py-32">
							<view class="">
								入驻说明
							</view>
							<view class="">
								<view>1.请按照要求如实填写商户信息，上传图片，必须美观！</view>
								<view>2.上传后，等待客服审核！</view>
							</view>
						</view>
						<view class="flex mt-48">
							<u-checkbox-group v-model="checked">
								<u-checkbox name="true" shape="square" activeColor="#F45403" label=" "></u-checkbox>
							</u-checkbox-group>
							<view>我已阅读并同意</view>
							<view @click="navigator">《商家入驻协议》</view>
						</view>
					</view>

					<!-- 审核中 -->
					<view class="bg-FFF px-20 relative round-12 flex flex-col items-center" v-if="verifyState == 0">
						<image src="https://file.fulewanjia.com/fulewanjia/profile/preImages/business/shenghezhong.png"
							class="image-200"></image>
						<text class="mt-32">审核中</text>
						<text class="mt-16">请耐心等待，平台正在审核中</text>
						<view class="btn round-8 text-center text-FFF text-24 shadow-20 mt-48" @click="$tab.back()">
							我知道了
						</view>
					</view>

					<!-- 审核成功 交保证金  -->
					<view class="bg-FFF px-20 relative round-12 flex flex-col items-center"
						v-if="verifyState==1 && authentication !=1">
						<image
							src="https://file.fulewanjia.com/fulewanjia/profile/preImages/business/shenhechengong.png"
							class="image-200"></image>
						<view class="mt-32">审核成功</view>
						<view class="mt-16">恭喜您通过审核，缴纳上架管理费后即可上线店铺</view>
						<view class="sprice text-32">
							<text style="font-size: 24rpx;">￥</text> {{ ensure }}
						</view>

						<view class="flex mt-48">
							<u-checkbox-group v-model="checked">
								<u-checkbox name="true" shape="circle" label=" "></u-checkbox>
							</u-checkbox-group>
							<view>我已阅读并同意</view>
							<view @click="navigator">《商家入驻协议》</view>
						</view>
						<view class="flex justify-around items-center mt-48">
							<!-- #ifdef APP-PLUS || H5 -->
							<view class="btn round-8 text-center text-FFF text-24 shadow-20  box-2 mr-24"
								@click="payConfrim(1)">
								支付宝支付
							</view>
							<!-- #endif -->
							<view class="btn round-8 text-center text-FFF text-24 shadow-20" @click="payConfrim(2)">
								微信支付
							</view>
						</view>
					</view>

					<!-- 审核成功 付款过 -->
					<view class="bg-FFF px-20 relative round-12 flex flex-col items-center"
						v-if="verifyState==1 && authentication==1">
						<image
							src="https://file.fulewanjia.com/fulewanjia/profile/preImages/business/shenhechengong.png"
							class="image-200"></image>
						<text class="mt-32">恭喜您，已入住平台店铺</text>
						<view class="btn round-8 text-center text-FFF text-24 shadow-20 mt-48"
							@click="$tab.nav(`/pages/mine/store/index`)" v-if="userInfo.storeZfbOpenId">
							前往我的店铺
						</view>

						<view class="btn round-8 text-center text-FFF text-24 shadow-20 mt-48" @click="bandAli" v-else>
							前往绑定支付宝
						</view>
					</view>

					<!-- 审核是失败 付款过 -->
					<view class="bg-FFF px-20 relative round-12 flex flex-col items-center" v-if="verifyState == 2">
						<image src="https://file.fulewanjia.com/fulewanjia/profile/preImages/business/shenghezhong.png"
							class="image-200"></image>
						<text class="mt-32">审核失败</text>
						<text class="mt-16">审核失败，请重新填写申请</text>
						<view class="btn round-8 text-center text-FFF text-24 shadow-20 mt-48"
							@click="verifyState =- 1">
							重新申请
						</view>
					</view>

				</view>

				<view class="" style="height: 50rpx;">

				</view>
			</scroll-view>
		</view>


		<u-loading-page :loading="loading"
			image="https://file.fulewanjia.com/fulewanjia/profile/appImages/common/loading.gif" icon-size="100"
			loading-text=" "></u-loading-page>

		<!-- 省市区选择 -->
		<w-picker :visible.sync="regionVisible" mode="region" :value="defaultRegion" default-type="value"
			:hide-area="false" @confirm="onConfirm" ref="region"></w-picker>

		<u-picker :show="storeTypeShow" :columns="storeTypeList" keyName="name" @cancel="storeTypeShow = false" @confirm="storeTypeConfirm"></u-picker>
	</view>
</template>

<script>
	import wPicker from '@/components/w-picker/w-picker'
	import {
		throttle
	} from 'throttle-debounce';
	var thro;
	export default {
		components: {
			wPicker
		},
		data() {
			return {
				storeTypeShow: false,
				storeTypeList: [],
				storeTypeName: "",
				loading: false,
				verifyState: -1, //0.待审核  1.审核通过 2.审核失败 -1 是还没提交审核
				authentication: null, // == 1 交钱了 否则没交 
				ensure: null, //保证金
				current: 0, //审核步骤条
				checked: [], //交保证金商家入驻协议
				regionVisible: false, //省市区
				defaultRegion: ["1", "1", "1"],
				form: {
					name: "", //店铺名称
					type: "", //店铺类型
					businessModel:1,//经营模式
					address: "", //店铺地址
					province: "", //省
					cityName: "", //市
					areaName: "", //区
					legalName: "", //法人姓名
					linkerMobile: "", //联系人手机号
					legal: "", //法人身份证号
					linkerName: "", //联系人
					phone: "", //联系人手机号
					liceniceNo: "", //营业执照编号
					businessLicense: "", //营业执照
					legalCardFront: "", //法人身份证正面
					bankLicenice: "", //开户许可证
					leaseContract: "", //租赁合同
					flair: "", //特殊资质
					// trade: 1, //入驻类型
					openName: "", //开户名称
					openBank: "", //开户银行
					openBankCard: "", //开户行账号
					bankCard: {
						userName: "", //持卡人姓名
						cardMobile: "", //结算人电话
						idCard: "", //持卡人身份证
					},
					detail: "", //店铺介绍
					logo: "", //店铺logo
					doorHead: "", //门头照
					inDoorOne: "", //内景照
					intro: "", //入驻说明
					isOnline: 1, //结算类型
					holdMixPay: 0, //混合支付
					leader: this.$store.getters.userInfo.userId,
					lon: "",
					lng: "",
				},
				liceniceList: [], //营业执照图片上传
				legalCardFrontList: [],
				bankLiceniceList: [],
				leaseContractList: [],
				flairList: [],
				logoList: [],
				doorHeadList: [],
				inDoorOneList: [],
				//门店校验规则
				storeRules: {
					discountRate: [{
							required: true,
							message: '请输入店铺让利比例',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return /^(?:0|[1]\.00)?$|^0\.\d[0-9]$|^1\.0[0]$/.test(value);
							},
							message: '让利比例为小于等于1的俩位小数',
							trigger: ['change', 'blur'],
						}
					],
					detail: {
						type: 'string',
						required: true,
						message: '请输入店铺介绍',
						trigger: ['blur', 'change']
					},
					logo: {
						type: 'string',
						required: true,
						message: '请上传店铺logo',
						trigger: ['blur', 'change']
					},
					doorHead: {
						type: 'string',
						required: true,
						message: '请上传门头照',
						trigger: ['blur', 'change']
					},
					inDoorOne: {
						type: 'string',
						required: true,
						message: '请上传内景照',
						trigger: ['blur', 'change']
					},
				},
				//开户信息校验规则
				openRules: {
					'openName': {
						type: 'string',
						required: true,
						message: '请输入开户行名称',
						trigger: ['blur', 'change']
					},
					'openBank': {
						type: 'string',
						required: true,
						message: '请输入开户银行',
						trigger: ['blur', 'change']
					},
					'openBankCard': {
						type: 'string',
						required: true,
						message: '请输入开户行账号',
						trigger: ['blur', 'change']
					},
					'bankCard.userName': {
						type: 'string',
						required: true,
						message: '请输入持卡人姓名',
						trigger: ['blur', 'change']
					},
					'bankCard.cardMobile': [{
							required: true,
							message: '请输入银行预留手机号',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return uni.$u.test.mobile(value);
							},
							message: '请正确输入手机号',
							trigger: ['change', 'blur'],
						}
					],
					'bankCard.idCard': [{
							required: true,
							message: '请输入持卡人身份证号',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return uni.$u.test.idCard(value)
							},
							message: '请输入正确的身份证号码',
							trigger: ['change', 'blur'],
						}
					],
				},
				//公司信息校验条件
				companyRules: {
					lon: {
						type: 'string',
						required: true,
						message: '请选择店铺地址',
						trigger: ['blur', 'change']
					},
					type: {
						type: 'number',
						required: true,
						message: '请选择店铺类型',
						trigger: ['blur', 'change']
					},
					businessModel: {
						type: 'number',
						required: true,
						message: '请选择经营模式',
						trigger: ['blur', 'change']
					},
					name: {
						type: 'string',
						required: true,
						message: '请输入店铺名称',
						trigger: ['blur', 'change']
					},
					address: {
						type: 'string',
						required: true,
						message: '请选择店铺地址',
						trigger: ['blur', 'change']
					},
					legalName: {
						type: 'string',
						required: true,
						message: '请输入法人姓名',
						trigger: ['blur', 'change']
					},
					linkerMobile: [{
							required: true,
							message: '请输入联系人手机号',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return uni.$u.test.mobile(value);
							},
							message: '请输入正确的手机号!',
							trigger: ['change', 'blur'],
						}
					],
					legal: [{
							required: true,
							message: '请输入法人身份证号',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return uni.$u.test.idCard(value)
							},
							message: '请输入正确的身份证号码',
							trigger: ['change', 'blur'],
						}
					],
					linkerName: {
						type: 'string',
						required: true,
						message: '请输入店铺联系人',
						trigger: ['blur', 'change']
					},
					phone: [{
							required: true,
							message: '请输入联系人手机号',
							trigger: ['change', 'blur'],
						},
						{
							validator: (rule, value, callback) => {
								return uni.$u.test.mobile(value);
							},
							message: '请输入正确的手机号!',
							trigger: ['change', 'blur'],
						}
					],
					liceniceNo: {
						type: 'string',
						required: true,
						message: '请输入营业执照编号',
						trigger: ['blur', 'change']
					},
					businessLicense: {
						type: 'string',
						required: true,
						message: '请上传营业执照',
						trigger: ['blur', 'change']
					},
					legalCardFront: {
						type: 'string',
						required: true,
						message: '请上传法人身份证正面',
						trigger: ['blur', 'change']
					},
					bankLicenice: {
						type: 'string',
						required: true,
						message: '请上传开户许可证',
						trigger: ['blur', 'change']
					},
					leaseContract: {
						type: 'string',
						required: true,
						message: '请上传租赁合同',
						trigger: ['blur', 'change']
					},
				},
				
				// account: [{
				// 		name: '会员自营',
				// 		id: 1,
				// 	},
				// 	{
				// 		name: '优质商家',
				// 		id: 2,
				// 	},
				// ],

				settlement: [{
						name: '线上(快递)',
						id: 1,
					},
					{
						name: '线下(核销)',
						id: 2,
					},
				],
			};
		},
		onLoad() {
			thro = this
			//获取用户店铺状态
			this.getData()
		},
		computed: {
			userInfo() {
				return this.$store.state.user.userInfo
			}
		},
		onShow() {
			// #ifdef APP
			let args = plus.runtime.arguments;
			if (args) {
				plus.runtime.arguments = null;
				var authCode = args.split("=")[1];
				this.$Api.index.zfbStoreAccount({
					code: authCode
				}).then(bandAli => {
					console.log('bandAli', bandAli)
					this.$store.dispatch('GetInfo')
				})
			}
			// #endif
		},
		methods: {
			storeTypeConfirm(e){
				console.log(e)
				this.form.type = e.value[0].id
				this.storeTypeName = e.value[0].name
				this.storeTypeShow = false
			},
			bandAli() {
				if (!this.userInfo.storeZfbOpenId) {
					let that = this
					// #ifdef APP
					let backUrl = 'https://d.fulewanjia.com/aliLogin.html';
					let aplipayAuthUrl = 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm'; //授权地址，可前端写死，也可后端返回
					let appid = '2021004138648121'; //商户的APPID 
					let url = aplipayAuthUrl + '?app_id=' + appid + '&scope=auth_user&redirect_uri=' + backUrl
					url = encodeURIComponent(url);

					plus.runtime.openURL(
						'alipays://platformapi/startapp?appId=20000067&url=' + url, //这里的appId=20000067是固定的，不需要改
						res => {
							//这里写打开URL地址失败后的处理
							uni.showToast({
								title: '请先安装支付宝!',
								icon: "none"
							})
						},
						'com.eg.android.AlipayGphone'
					);
					// #endif
				}
			},
			selectAdress() {
				uni.chooseLocation({
					success: (res) => {
						this.form.lon = res.longitude
						this.form.lng = res.latitude
					}
				})
			},
			payConfrim: throttle(2000, async (type) => {
				if (thro.checked.length == 0) {
					uni.$u.toast('请勾选入驻协议')
					return false
				}

				// #ifdef APP-PLUS || H5
				var platform = 0
				// #endif
				// #ifdef MP
				var platform = 1
				// #endif

				const res = await thro.$Api.store.apppaybond({
					payment: type,
					platform
				})

				if (type == 1) {
					const pay = await thro.$pay.Alipay(res.data)
				} else {
					const pay = await thro.$pay.WeChatPay(res)
				}

				thro.$modal.msg('支付成功')
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/personalCenter'
					});
				}, 1500)
			}, {
				noTrailing: true
			}),
			navigator() {
				let site = getApp().globalData.config.appInfo.agreements[3]
				this.$tab.nav(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
			},
			async getData() {
				this.loading = true
				const res = await this.$Api.store.appgetstores()

				if (res.data) {
					this.verifyState = res.data.verifyState
					this.authentication = res.data.authentication
				} else {
					this.verifyState = -1
					this.$nextTick(() => {
						this.$refs.companyRules.setRules(this.companyRules)
						this.$refs.openRules.setRules(this.openRules)
						this.$refs.storeRules.setRules(this.storeRules)
					})
				}

				const storeList = await this.$Api.common.typeChildrenAll({
					code: "merchantClassification"
				})

				this.storeTypeList = [storeList.data]

				this.loading = false

				if (this.verifyState == 1) {
					const ensure = await this.$Api.common.configInfo({
						key: 'store_bond'
					})
					this.ensure = ensure.msg
				}
			},
			handleErr(err) {
				let msg = []
				console.log(err, 'err')
				err.forEach((i) => {
					msg.push(i.message)
				})
				uni.$u.toast(msg[0])
			},
			nextStep() {
				if (thro.checked.length == 0) {
					uni.$u.toast('请勾选入驻协议')
					return false
				}
				switch (this.current) {
					case 0:
						this.$refs.companyRules.validate().then(res => {
							this.current += 1
						}).catch(errors => {
							this.handleErr(errors)
						})
						break
					case 1:
						this.$refs.openRules.validate().then(res => {
							this.current += 1
						}).catch(errors => {
							this.handleErr(errors)
						})
						break
					case 2:
						this.$refs.storeRules.validate().then(res => {
							this.$modal.confirm('确认提交审核吗?').then(async con => {
								if (con) {
									this.$Api.store.addStores(this.form).then(res => {
										this.verifyState = 0
									})
								}
							})
						}).catch(errors => {
							this.handleErr(errors)
						})
						break
				}
			},
			hideKeyboard() {
				uni.hideKeyboard()
			},
			onConfirm(res) {
				console.log(res, '地址选择')
				let result = res.obj
				this.form.address = res.result
				this.form.province = result.province.label
				this.form.cityName = result.city.label
				this.form.areaName = result.area.label
			},
			productDeletePic(event) {
				switch (event.name) {
					case "营业执照上传":
						this.liceniceList.splice(event.index, 1)
						this.form.businessLicense = ""
						break
					case "法人身份证正面":
						this.legalCardFrontList.splice(event.index, 1)
						this.form.legalCardFront = ""
						break
					case "开户许可证":
						this.bankLiceniceList.splice(event.index, 1)
						this.form.bankLicenice = ""
						break
					case "租赁合同":
						this.leaseContractList.splice(event.index, 1)
						this.form.leaseContract = ""
						break
					case "特殊资质":
						this.flairList.splice(event.index, 1)
						this.form.flair = ""
						break
					case "店铺logo":
						this.logoList.splice(event.index, 1)
						this.form.logo = ""
						break
					case "门头照":
						this.doorHeadList.splice(event.index, 1)
						this.form.doorHead = ""
						break
					case "内景照":
						this.inDoorOneList.splice(event.index, 1)
						this.form.inDoorOne = ''
						this.inDoorOneList.forEach((item, index) => {
							if (index == 0) {
								this.form.inDoorOne = item.fileName
							} else {
								this.form.inDoorOne = this.form.inDoorOne + ',' + item.fileName
							}
						})
						break
				}
			},
			async productAfterRead(event) {
				this.$Api.common.uploadFile(event.file.url).then(res => {
					switch (event.name) {
						case "营业执照上传":
							this.liceniceList.push({
								url: res.url
							})
							this.form.businessLicense = res.fileName
							break
						case "法人身份证正面":
							this.legalCardFrontList.push({
								url: res.url
							})
							this.form.legalCardFront = res.fileName
							break
						case "开户许可证":
							this.bankLiceniceList.push({
								url: res.url
							})
							this.form.bankLicenice = res.fileName
							break
						case "租赁合同":
							this.leaseContractList.push({
								url: res.url
							})
							this.form.leaseContract = res.fileName
							break
						case "特殊资质":
							this.flairList.push({
								url: res.url
							})
							this.form.flair = res.fileName
							break
						case "店铺logo":
							this.logoList.push({
								url: res.url
							})
							this.form.logo = res.fileName
							break
						case "门头照":
							this.doorHeadList.push({
								url: res.url
							})
							this.form.doorHead = res.fileName
							break
						case "内景照":
							this.inDoorOneList.push({
								url: res.url,
								fileName: res.fileName
							})
							this.form.inDoorOne = ''
							this.inDoorOneList.forEach((item, index) => {
								if (index == 0) {
									this.form.inDoorOne = item.fileName
								} else {
									this.form.inDoorOne = this.form.inDoorOne + ',' + item.fileName
								}
							})
							break
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F8F8F8;
		height: 100%;
	}

	.wrap {
		height: 100%;
	}

	.nav-box {
		width: 100%;
		height: 656rpx;
		background: url('https://file.fulewanjia.com/fulewanjia/profile/appImages/join-bg@2x.png');
		background-size: 100% 100%;
		position: fixed;
		left: 0;
		top: 0;
		z-index: 99;
	}

	.content {
		position: fixed;
		top: 504rpx;
		left: 0;
		z-index: 999;
		height: calc(100% - 504rpx);
	}

	.title {
		position: fixed;
		top: 500rpx;
		left: 20rpx;
		z-index: 999;
		width: 710rpx;
	}

	.btn {
		width: 336rpx;
		height: 64rpx;
		background: linear-gradient(180deg, #FF561D 33%, #FF0064 100%);
		line-height: 64rpx;
	}

	.box-1 {
		background-color: #FD212C;
	}

	.box-2 {
		background-color: #06B4FD;
	}

	/deep/ .uni-input-input {
		text-align: right !important;
	}

	/deep/ .u-input__content__field-wrapper__field {
		text-align: right !important;
	}

	// 图片上传
	/deep/ .u-upload__wrap {
		display: flex;
		flex-direction: row-reverse !important;
	}

	/deep/ .u-upload__button {
		margin: 0 !important;
	}

	/deep/ .u-radio-group--row {
		flex-direction: row-reverse !important;
	}

	/deep/ .u-radio {
		margin-right: 0 !important;
		margin-left: 16rpx;
	}
</style>